package main

import (
	"fmt"
	"math"
)

func consts() {
	const (
		filename = "abc.txt"
		a, b     = 3, 4
	)
	var c int
	c = int(math.Sqrt(a*a + b*b))
	fmt.Println(filename, c)
}

func enums() {
	//const (
	//	cpp  = 0
	//	java = 1
	//	python = 2
	//	golang = 3
	//)
	const (
		cpp = iota
		java
		python
		golang
	)
	const (
		b = 1 << (10 * iota)
		kb
		mb
		gb
		tb
		pb
	)
	fmt.Println(cpp, java, python, golang) // 0 1 2 3
	fmt.Println(b, kb, mb, gb, tb, pb)     // 1 1024 1048576 1073741824 1099511627776 1125899906842624
}
func main() {
	enums()
}
